﻿@model Yoze.Web.Models.EditTextViewModel

@{
    ViewBag.Title = "Edit Text";
}

<h2>Edit Text</h2>
@using (Html.BeginForm("Edit", "MyText", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary("", new { @class = "text-danger" })
    @Html.HiddenFor(x=>Model.TextId)
    <div class="form-group">
        @Html.LabelFor(m => m.Title, new { @class = "col-md-2 control-label" })
        <div class="col-md-10">
            @Html.TextBoxFor(m => m.Title, new { @class = "form-control" })
        </div>
    </div>
    <div class="form-group">
        @Html.LabelFor(m => m.Content, new { @class = "col-md-2 control-label" })
        <div class="col-md-10">
            @Html.TextAreaFor(m => m.Content, new { @class = "form-control" })
        </div>
    </div>
    <div class="form-group">
        <div class="col-md-offset-2 col-md-10">
            <input type="submit" class="btn btn-primary" value="Save" />
            <input type="button" class="btn btn-default" value="Cancel" onclick="location.href='@Url.Action("Index", "MyText")'" />
        </div>
    </div>
}


@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}

